Hệ thống quản lý trường học bằng PHP / MySQLi

1 <?php
2 $sql=
"SELECT * FROM studentstable WHERE course_id=1";
3 $result=mysqli_query($db,$sql) or die(
"error getting data");
4 $class1=mysqli_num_rows($result);
5
6 ?>
7 <?php
8 $sql=
"SELECT * FROM studentstable WHERE course_id=2";
9 $result=mysqli_query($db,$sql) or die(
"error getting data");
10 $class2=mysqli_num_rows($result);
11
12 ?>
13 <?php
14 $sql=
"SELECT * FROM studentstable WHERE course_id=3";
15 $result=mysqli_query($db,$sql) or die(
"error getting data");
16 $class3=mysqli_num_rows($result);
17
18 ?>
19 <?php
20 $sql=
"SELECT * FROM studentstable WHERE course_id=4";
21 $result=mysqli_query($db,$sql) or die(
"error getting data");
22 $class4=mysqli_num_rows($result);
23
24 ?>
25 <?php
26 $sql=
"SELECT * FROM studentstable WHERE course_id=5";
27 $result=mysqli_query($db,$sql) or die(
"error getting data");
28 $class5=mysqli_num_rows($result);
29
30 ?>
31 <?php
32 $sql=
"SELECT * FROM studentstable WHERE course_id=6";
33 $result=mysqli_query($db,$sql) or die(
"error getting data");
34 $class6=mysqli_num_rows($result);
35
36 ?>
37 <?php
38 $sql=
"SELECT * FROM studentstable WHERE course_id=7";
39 $result=mysqli_query($db,$sql) or die(
"error getting data");
40 $class7=mysqli_num_rows($result);
41
42 ?>
43 <?php
44 $sql=
"SELECT * FROM studentstable WHERE course_id=8";
45 $result=mysqli_query($db,$sql) or die(
"error getting data");
46 $class8=mysqli_num_rows($result);
47
48 ?>


Gõ tìm kiếm nhanh...